<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>后台首页</title>
<link rel="stylesheet" href="js/layui-2.5.4/css/layui.css">
<script src="js/layui-2.5.4/layui.js"></script>
</head>
<body class="layui-layout-body">
	<div class="layui-layout layui-layout-admin">

		<div class="layui-header">
			<div class="layui-logo">layui 后台布局</div>
			<!-- 头部区域（可配合layui已有的水平导航） -->
			<ul class="layui-nav layui-layout-left">
				<li class="layui-nav-item"><a href="">控制台</a></li>
				<li class="layui-nav-item"><a href="">商品管理</a></li>
				<li class="layui-nav-item"><a href="">用户</a></li>
				<li class="layui-nav-item"><a href="javascript:;">其它系统</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="">邮件管理</a>
						</dd>
						<dd>
							<a href="">消息管理</a>
						</dd>
						<dd>
							<a href="">授权管理</a>
						</dd>
					</dl></li>
			</ul>
			<ul class="layui-nav layui-layout-right">
				<li class="layui-nav-item"><a href="javascript:;"> <img
						src="http://t.cn/RCzsdCq" class="layui-nav-img"> 贤心
				</a>
					<dl class="layui-nav-child">
						<dd>
							<a href="">基本资料</a>
						</dd>
						<dd>
							<a href="">安全设置</a>
						</dd>
					</dl></li>
				<li class="layui-nav-item"><a href="">退了</a></li>
			</ul>
		</div>



		<div class="layui-side layui-bg-black">
			<div class="layui-side-scroll">
				<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
				<ul class="layui-nav layui-nav-tree" lay-filter="test">
					<li class="layui-nav-item layui-nav-itemed"><a class=""
						href="javascript:;">所有商品</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="javascript:;">列表一</a>
							</dd>
							<dd>
								<a href="javascript:;">列表二</a>
							</dd>
							<dd>
								<a href="javascript:;">列表三</a>
							</dd>
							<dd>
								<a href="">超链接</a>
							</dd>
						</dl></li>
					<li class="layui-nav-item"><a href="javascript:;">解决方案</a>
						<dl class="layui-nav-child">
							<dd>
								<a href="/user">列表一</a>
							</dd>
							<dd>
								<a href="/user">列表二</a>
							</dd>
							<dd>
								<a href="">超链接</a>
							</dd>
						</dl></li>
					<li class="layui-nav-item"><a href="">云市场</a></li>
					<li class="layui-nav-item"><a href="">发布商品</a></li>
				</ul>
			</div>

		</div>

		<div class="layui-body">

			<div class="layui-tab" lay-filter="main_content"
				lay-allowClose="true">
				<ul class="layui-tab-title">
					<li class="layui-this first-tab" lay-id="111">首页</li>
					<li lay-id="222">发送信息</li>
					<li lay-id="333">权限分配</li>
					<li lay-id="444">审核</li>
					<li lay-id="555">订单管理</li>
				</ul>
			</div>
			<iframe id="iframeMain" frameborder='no' scrolling='no' src=""
				style="width: 100%;" height="100%;"></iframe>

		</div>

		<div class="layui-footer">
			<!-- 底部固定区域 -->
			© layui.com - 底部固定区域
		</div>

		<script>
			//JavaScript代码区域
			layui.use([ 'jquery', 'layer', 'element' ], function() {
				var $ = layui.$;
				var layer = layui.layer;
				var element = layui.element;
				/*界面切换  */
				$("dd>a").click(function(e) {
					e.preventDefault();
					$("#iframeMain").attr("src", $(this).attr("href"));
				});
				//一下代码是根据窗口高度在设置iframe的高度
				var frame = $("#iframeMain");
				var frameheight = $(window).height();
				console.log(frameheight);
				frame.css("height", frameheight);
			});
		</script>

	</div>
</body>
</html>